package com.aicoq.example.stock.persist.model.example;

import java.util.ArrayList;
import java.util.List;

public class StockCategoryExample {
    protected String orderByClause;

    protected boolean distinct;

    protected List<Criteria> oredCriteria;

    public StockCategoryExample() {
        oredCriteria = new ArrayList<>();
    }

    public void setOrderByClause(String orderByClause) {
        this.orderByClause = orderByClause;
    }

    public String getOrderByClause() {
        return orderByClause;
    }

    public void setDistinct(boolean distinct) {
        this.distinct = distinct;
    }

    public boolean isDistinct() {
        return distinct;
    }

    public List<Criteria> getOredCriteria() {
        return oredCriteria;
    }

    public void or(Criteria criteria) {
        oredCriteria.add(criteria);
    }

    public Criteria or() {
        Criteria criteria = createCriteriaInternal();
        oredCriteria.add(criteria);
        return criteria;
    }

    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    protected Criteria createCriteriaInternal() {
        Criteria criteria = new Criteria();
        return criteria;
    }

    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        distinct = false;
    }

    protected abstract static class GeneratedCriteria {
        protected List<Criterion> criteria;

        protected GeneratedCriteria() {
            super();
            criteria = new ArrayList<>();
        }

        public boolean isValid() {
            return criteria.size() > 0;
        }

        public List<Criterion> getAllCriteria() {
            return criteria;
        }

        public List<Criterion> getCriteria() {
            return criteria;
        }

        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new Criterion(condition));
        }

        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value));
        }

        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value1, value2));
        }

        public Criteria andCategoryIdIsNull() {
            addCriterion("category_id is null");
            return (Criteria) this;
        }

        public Criteria andCategoryIdIsNotNull() {
            addCriterion("category_id is not null");
            return (Criteria) this;
        }

        public Criteria andCategoryIdEqualTo(Integer value) {
            addCriterion("category_id =", value, "categoryId");
            return (Criteria) this;
        }

        public Criteria andCategoryIdNotEqualTo(Integer value) {
            addCriterion("category_id <>", value, "categoryId");
            return (Criteria) this;
        }

        public Criteria andCategoryIdGreaterThan(Integer value) {
            addCriterion("category_id >", value, "categoryId");
            return (Criteria) this;
        }

        public Criteria andCategoryIdGreaterThanOrEqualTo(Integer value) {
            addCriterion("category_id >=", value, "categoryId");
            return (Criteria) this;
        }

        public Criteria andCategoryIdLessThan(Integer value) {
            addCriterion("category_id <", value, "categoryId");
            return (Criteria) this;
        }

        public Criteria andCategoryIdLessThanOrEqualTo(Integer value) {
            addCriterion("category_id <=", value, "categoryId");
            return (Criteria) this;
        }

        public Criteria andCategoryIdIn(List<Integer> values) {
            addCriterion("category_id in", values, "categoryId");
            return (Criteria) this;
        }

        public Criteria andCategoryIdNotIn(List<Integer> values) {
            addCriterion("category_id not in", values, "categoryId");
            return (Criteria) this;
        }

        public Criteria andCategoryIdBetween(Integer value1, Integer value2) {
            addCriterion("category_id between", value1, value2, "categoryId");
            return (Criteria) this;
        }

        public Criteria andCategoryIdNotBetween(Integer value1, Integer value2) {
            addCriterion("category_id not between", value1, value2, "categoryId");
            return (Criteria) this;
        }

        public Criteria andParentCategoryKeyIsNull() {
            addCriterion("parent_category_key is null");
            return (Criteria) this;
        }

        public Criteria andParentCategoryKeyIsNotNull() {
            addCriterion("parent_category_key is not null");
            return (Criteria) this;
        }

        public Criteria andParentCategoryKeyEqualTo(String value) {
            addCriterion("parent_category_key =", value, "parentCategoryKey");
            return (Criteria) this;
        }

        public Criteria andParentCategoryKeyNotEqualTo(String value) {
            addCriterion("parent_category_key <>", value, "parentCategoryKey");
            return (Criteria) this;
        }

        public Criteria andParentCategoryKeyGreaterThan(String value) {
            addCriterion("parent_category_key >", value, "parentCategoryKey");
            return (Criteria) this;
        }

        public Criteria andParentCategoryKeyGreaterThanOrEqualTo(String value) {
            addCriterion("parent_category_key >=", value, "parentCategoryKey");
            return (Criteria) this;
        }

        public Criteria andParentCategoryKeyLessThan(String value) {
            addCriterion("parent_category_key <", value, "parentCategoryKey");
            return (Criteria) this;
        }

        public Criteria andParentCategoryKeyLessThanOrEqualTo(String value) {
            addCriterion("parent_category_key <=", value, "parentCategoryKey");
            return (Criteria) this;
        }

        public Criteria andParentCategoryKeyLike(String value) {
            addCriterion("parent_category_key like", value, "parentCategoryKey");
            return (Criteria) this;
        }

        public Criteria andParentCategoryKeyNotLike(String value) {
            addCriterion("parent_category_key not like", value, "parentCategoryKey");
            return (Criteria) this;
        }

        public Criteria andParentCategoryKeyIn(List<String> values) {
            addCriterion("parent_category_key in", values, "parentCategoryKey");
            return (Criteria) this;
        }

        public Criteria andParentCategoryKeyNotIn(List<String> values) {
            addCriterion("parent_category_key not in", values, "parentCategoryKey");
            return (Criteria) this;
        }

        public Criteria andParentCategoryKeyBetween(String value1, String value2) {
            addCriterion("parent_category_key between", value1, value2, "parentCategoryKey");
            return (Criteria) this;
        }

        public Criteria andParentCategoryKeyNotBetween(String value1, String value2) {
            addCriterion("parent_category_key not between", value1, value2, "parentCategoryKey");
            return (Criteria) this;
        }

        public Criteria andCategoryKeyIsNull() {
            addCriterion("category_key is null");
            return (Criteria) this;
        }

        public Criteria andCategoryKeyIsNotNull() {
            addCriterion("category_key is not null");
            return (Criteria) this;
        }

        public Criteria andCategoryKeyEqualTo(String value) {
            addCriterion("category_key =", value, "categoryKey");
            return (Criteria) this;
        }

        public Criteria andCategoryKeyNotEqualTo(String value) {
            addCriterion("category_key <>", value, "categoryKey");
            return (Criteria) this;
        }

        public Criteria andCategoryKeyGreaterThan(String value) {
            addCriterion("category_key >", value, "categoryKey");
            return (Criteria) this;
        }

        public Criteria andCategoryKeyGreaterThanOrEqualTo(String value) {
            addCriterion("category_key >=", value, "categoryKey");
            return (Criteria) this;
        }

        public Criteria andCategoryKeyLessThan(String value) {
            addCriterion("category_key <", value, "categoryKey");
            return (Criteria) this;
        }

        public Criteria andCategoryKeyLessThanOrEqualTo(String value) {
            addCriterion("category_key <=", value, "categoryKey");
            return (Criteria) this;
        }

        public Criteria andCategoryKeyLike(String value) {
            addCriterion("category_key like", value, "categoryKey");
            return (Criteria) this;
        }

        public Criteria andCategoryKeyNotLike(String value) {
            addCriterion("category_key not like", value, "categoryKey");
            return (Criteria) this;
        }

        public Criteria andCategoryKeyIn(List<String> values) {
            addCriterion("category_key in", values, "categoryKey");
            return (Criteria) this;
        }

        public Criteria andCategoryKeyNotIn(List<String> values) {
            addCriterion("category_key not in", values, "categoryKey");
            return (Criteria) this;
        }

        public Criteria andCategoryKeyBetween(String value1, String value2) {
            addCriterion("category_key between", value1, value2, "categoryKey");
            return (Criteria) this;
        }

        public Criteria andCategoryKeyNotBetween(String value1, String value2) {
            addCriterion("category_key not between", value1, value2, "categoryKey");
            return (Criteria) this;
        }

        public Criteria andCategoryNameIsNull() {
            addCriterion("category_name is null");
            return (Criteria) this;
        }

        public Criteria andCategoryNameIsNotNull() {
            addCriterion("category_name is not null");
            return (Criteria) this;
        }

        public Criteria andCategoryNameEqualTo(String value) {
            addCriterion("category_name =", value, "categoryName");
            return (Criteria) this;
        }

        public Criteria andCategoryNameNotEqualTo(String value) {
            addCriterion("category_name <>", value, "categoryName");
            return (Criteria) this;
        }

        public Criteria andCategoryNameGreaterThan(String value) {
            addCriterion("category_name >", value, "categoryName");
            return (Criteria) this;
        }

        public Criteria andCategoryNameGreaterThanOrEqualTo(String value) {
            addCriterion("category_name >=", value, "categoryName");
            return (Criteria) this;
        }

        public Criteria andCategoryNameLessThan(String value) {
            addCriterion("category_name <", value, "categoryName");
            return (Criteria) this;
        }

        public Criteria andCategoryNameLessThanOrEqualTo(String value) {
            addCriterion("category_name <=", value, "categoryName");
            return (Criteria) this;
        }

        public Criteria andCategoryNameLike(String value) {
            addCriterion("category_name like", value, "categoryName");
            return (Criteria) this;
        }

        public Criteria andCategoryNameNotLike(String value) {
            addCriterion("category_name not like", value, "categoryName");
            return (Criteria) this;
        }

        public Criteria andCategoryNameIn(List<String> values) {
            addCriterion("category_name in", values, "categoryName");
            return (Criteria) this;
        }

        public Criteria andCategoryNameNotIn(List<String> values) {
            addCriterion("category_name not in", values, "categoryName");
            return (Criteria) this;
        }

        public Criteria andCategoryNameBetween(String value1, String value2) {
            addCriterion("category_name between", value1, value2, "categoryName");
            return (Criteria) this;
        }

        public Criteria andCategoryNameNotBetween(String value1, String value2) {
            addCriterion("category_name not between", value1, value2, "categoryName");
            return (Criteria) this;
        }

        public Criteria andLevelIsNull() {
            addCriterion("level is null");
            return (Criteria) this;
        }

        public Criteria andLevelIsNotNull() {
            addCriterion("level is not null");
            return (Criteria) this;
        }

        public Criteria andLevelEqualTo(Integer value) {
            addCriterion("level =", value, "level");
            return (Criteria) this;
        }

        public Criteria andLevelNotEqualTo(Integer value) {
            addCriterion("level <>", value, "level");
            return (Criteria) this;
        }

        public Criteria andLevelGreaterThan(Integer value) {
            addCriterion("level >", value, "level");
            return (Criteria) this;
        }

        public Criteria andLevelGreaterThanOrEqualTo(Integer value) {
            addCriterion("level >=", value, "level");
            return (Criteria) this;
        }

        public Criteria andLevelLessThan(Integer value) {
            addCriterion("level <", value, "level");
            return (Criteria) this;
        }

        public Criteria andLevelLessThanOrEqualTo(Integer value) {
            addCriterion("level <=", value, "level");
            return (Criteria) this;
        }

        public Criteria andLevelIn(List<Integer> values) {
            addCriterion("level in", values, "level");
            return (Criteria) this;
        }

        public Criteria andLevelNotIn(List<Integer> values) {
            addCriterion("level not in", values, "level");
            return (Criteria) this;
        }

        public Criteria andLevelBetween(Integer value1, Integer value2) {
            addCriterion("level between", value1, value2, "level");
            return (Criteria) this;
        }

        public Criteria andLevelNotBetween(Integer value1, Integer value2) {
            addCriterion("level not between", value1, value2, "level");
            return (Criteria) this;
        }

        public Criteria andDataFlagIsNull() {
            addCriterion("data_flag is null");
            return (Criteria) this;
        }

        public Criteria andDataFlagIsNotNull() {
            addCriterion("data_flag is not null");
            return (Criteria) this;
        }

        public Criteria andDataFlagEqualTo(String value) {
            addCriterion("data_flag =", value, "dataFlag");
            return (Criteria) this;
        }

        public Criteria andDataFlagNotEqualTo(String value) {
            addCriterion("data_flag <>", value, "dataFlag");
            return (Criteria) this;
        }

        public Criteria andDataFlagGreaterThan(String value) {
            addCriterion("data_flag >", value, "dataFlag");
            return (Criteria) this;
        }

        public Criteria andDataFlagGreaterThanOrEqualTo(String value) {
            addCriterion("data_flag >=", value, "dataFlag");
            return (Criteria) this;
        }

        public Criteria andDataFlagLessThan(String value) {
            addCriterion("data_flag <", value, "dataFlag");
            return (Criteria) this;
        }

        public Criteria andDataFlagLessThanOrEqualTo(String value) {
            addCriterion("data_flag <=", value, "dataFlag");
            return (Criteria) this;
        }

        public Criteria andDataFlagLike(String value) {
            addCriterion("data_flag like", value, "dataFlag");
            return (Criteria) this;
        }

        public Criteria andDataFlagNotLike(String value) {
            addCriterion("data_flag not like", value, "dataFlag");
            return (Criteria) this;
        }

        public Criteria andDataFlagIn(List<String> values) {
            addCriterion("data_flag in", values, "dataFlag");
            return (Criteria) this;
        }

        public Criteria andDataFlagNotIn(List<String> values) {
            addCriterion("data_flag not in", values, "dataFlag");
            return (Criteria) this;
        }

        public Criteria andDataFlagBetween(String value1, String value2) {
            addCriterion("data_flag between", value1, value2, "dataFlag");
            return (Criteria) this;
        }

        public Criteria andDataFlagNotBetween(String value1, String value2) {
            addCriterion("data_flag not between", value1, value2, "dataFlag");
            return (Criteria) this;
        }

        public Criteria andDataSourceIsNull() {
            addCriterion("data_source is null");
            return (Criteria) this;
        }

        public Criteria andDataSourceIsNotNull() {
            addCriterion("data_source is not null");
            return (Criteria) this;
        }

        public Criteria andDataSourceEqualTo(String value) {
            addCriterion("data_source =", value, "dataSource");
            return (Criteria) this;
        }

        public Criteria andDataSourceNotEqualTo(String value) {
            addCriterion("data_source <>", value, "dataSource");
            return (Criteria) this;
        }

        public Criteria andDataSourceGreaterThan(String value) {
            addCriterion("data_source >", value, "dataSource");
            return (Criteria) this;
        }

        public Criteria andDataSourceGreaterThanOrEqualTo(String value) {
            addCriterion("data_source >=", value, "dataSource");
            return (Criteria) this;
        }

        public Criteria andDataSourceLessThan(String value) {
            addCriterion("data_source <", value, "dataSource");
            return (Criteria) this;
        }

        public Criteria andDataSourceLessThanOrEqualTo(String value) {
            addCriterion("data_source <=", value, "dataSource");
            return (Criteria) this;
        }

        public Criteria andDataSourceLike(String value) {
            addCriterion("data_source like", value, "dataSource");
            return (Criteria) this;
        }

        public Criteria andDataSourceNotLike(String value) {
            addCriterion("data_source not like", value, "dataSource");
            return (Criteria) this;
        }

        public Criteria andDataSourceIn(List<String> values) {
            addCriterion("data_source in", values, "dataSource");
            return (Criteria) this;
        }

        public Criteria andDataSourceNotIn(List<String> values) {
            addCriterion("data_source not in", values, "dataSource");
            return (Criteria) this;
        }

        public Criteria andDataSourceBetween(String value1, String value2) {
            addCriterion("data_source between", value1, value2, "dataSource");
            return (Criteria) this;
        }

        public Criteria andDataSourceNotBetween(String value1, String value2) {
            addCriterion("data_source not between", value1, value2, "dataSource");
            return (Criteria) this;
        }

        public Criteria andHotFlagIsNull() {
            addCriterion("hot_flag is null");
            return (Criteria) this;
        }

        public Criteria andHotFlagIsNotNull() {
            addCriterion("hot_flag is not null");
            return (Criteria) this;
        }

        public Criteria andHotFlagEqualTo(Integer value) {
            addCriterion("hot_flag =", value, "hotFlag");
            return (Criteria) this;
        }

        public Criteria andHotFlagNotEqualTo(Integer value) {
            addCriterion("hot_flag <>", value, "hotFlag");
            return (Criteria) this;
        }

        public Criteria andHotFlagGreaterThan(Integer value) {
            addCriterion("hot_flag >", value, "hotFlag");
            return (Criteria) this;
        }

        public Criteria andHotFlagGreaterThanOrEqualTo(Integer value) {
            addCriterion("hot_flag >=", value, "hotFlag");
            return (Criteria) this;
        }

        public Criteria andHotFlagLessThan(Integer value) {
            addCriterion("hot_flag <", value, "hotFlag");
            return (Criteria) this;
        }

        public Criteria andHotFlagLessThanOrEqualTo(Integer value) {
            addCriterion("hot_flag <=", value, "hotFlag");
            return (Criteria) this;
        }

        public Criteria andHotFlagIn(List<Integer> values) {
            addCriterion("hot_flag in", values, "hotFlag");
            return (Criteria) this;
        }

        public Criteria andHotFlagNotIn(List<Integer> values) {
            addCriterion("hot_flag not in", values, "hotFlag");
            return (Criteria) this;
        }

        public Criteria andHotFlagBetween(Integer value1, Integer value2) {
            addCriterion("hot_flag between", value1, value2, "hotFlag");
            return (Criteria) this;
        }

        public Criteria andHotFlagNotBetween(Integer value1, Integer value2) {
            addCriterion("hot_flag not between", value1, value2, "hotFlag");
            return (Criteria) this;
        }
    }

    public static class Criteria extends GeneratedCriteria {
        protected Criteria() {
            super();
        }
    }

    public static class Criterion {
        private String condition;

        private Object value;

        private Object secondValue;

        private boolean noValue;

        private boolean singleValue;

        private boolean betweenValue;

        private boolean listValue;

        private String typeHandler;

        public String getCondition() {
            return condition;
        }

        public Object getValue() {
            return value;
        }

        public Object getSecondValue() {
            return secondValue;
        }

        public boolean isNoValue() {
            return noValue;
        }

        public boolean isSingleValue() {
            return singleValue;
        }

        public boolean isBetweenValue() {
            return betweenValue;
        }

        public boolean isListValue() {
            return listValue;
        }

        public String getTypeHandler() {
            return typeHandler;
        }

        protected Criterion(String condition) {
            super();
            this.condition = condition;
            this.typeHandler = null;
            this.noValue = true;
        }

        protected Criterion(String condition, Object value, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.typeHandler = typeHandler;
            if (value instanceof List<?>) {
                this.listValue = true;
            } else {
                this.singleValue = true;
            }
        }

        protected Criterion(String condition, Object value) {
            this(condition, value, null);
        }

        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.secondValue = secondValue;
            this.typeHandler = typeHandler;
            this.betweenValue = true;
        }

        protected Criterion(String condition, Object value, Object secondValue) {
            this(condition, value, secondValue, null);
        }
    }
}